package com.example.birdfriends.dao;

import com.example.birdfriends.pojo.praise.Praise;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;

@Mapper
public interface PraiseDao {
    public int praisePost(Praise praise);
    public List<Long> findPraiseByPidAndUid(@Param("pid") Long pid, @Param("uid") Long uid);
    public List<Long> findPraisesByPid(Long pid);
    public int deletePraise(@Param("pid") Long pid, @Param("uid") Long uid);  // 一个用户只能点赞一个帖子一次，所以一个pid和uid只对应一个praiseId
    public List<Long> findUidsInPraisesByPid(Long pid);
    public List<Praise> findPraises();
    public List<Long> findOtherPraiseUidsByPidWithoutCurLoginUid(@Param("pid") Long pid, @Param("curLoginUid") Long curLoginUid);
}
